<template>
	<view>
		<!-- #ifdef MP-WEIXIN -->
		<myheader :leftType="3" leftUrl="/pages/find/index" :noLeft="false" showTitle="服务分享"></myheader>
		<!-- #endif -->
		<view class="main">
			<view class="main-wrap">
				<view class="main-img">
					<image src="../../static/juxing.svg" mode="widthFix" alt="弧形" class="main-img-juxing" />
					<view class="main-img-avatar">
						
						<img src="../../static/default-head.svg" alt="头像" class="main-img-avatar-img">
						<view class="main-img-avatar-name">我是名称</view>
					</view>
				</view>
				<view class="main-box">
					<view class="main-box-title">邀请你体验「<text class="main-box-title-bold">易酸痛肿胀体质调理养护膳食方案</text>」，快来试试吧~</view>
					<view class="main-box-tag">
						<view class="main-box-tag-item" :class="index + 1?'color'+(index+1):''" v-for="(item, index) in tags" :key="index">{{ item.name }}</view>
					</view>
					<view class="main-box-qrcode">
						<img src="../../static/default-head.svg" alt="" class="main-box-qrcode-left">
						<view class="main-box-qrcode-right">
							<view class="main-box-qrcode-right-top">长按识别看详细信息</view>
							<view class="main-box-qrcode-right-bottom">快来试试吧~</view>
						</view>
					</view>
					<view class="main-box-copyright">本服务由「<text class="main-box-copyright-title">商家工商注册主体名称</text>」发布，由咪呀哈咪科技有限公司提供技术支持。</view>
				</view>
				<view class="main-wrap-slogon">
					<img src="../../static/default-head.svg" alt="" class="main-wrap-slogon-1" />
					<view class="main-wrap-slogon-2">咪呀哈咪</view>
					<view class="main-wrap-slogon-3">AI营养保健师</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import myheader from '../../components/header/index.vue';
	export default {
		components: {
			myheader
		},
		data() {
			return {
				tags: [
					{
						name: '推荐1'
					},
					{
						name: '推荐很长的标签2'
					},
					{
						name: '推荐标签3'
					},
					{
						name: '推荐很长很长标签4'
					}
				]
			}
		},
		methods: {
			
		}
	}
</script>

<style lang="scss" scoped>
	.color1 {
		background: rgba(26, 188, 156, 0.05);
		
		color: #1ABC9C;
		border: 2px solid rgba(26, 188, 156, 0.16);
	}
	.color2 {
		background: rgba(231, 76, 60, 0.05);
		
		color: #E74C3C;
		border: 2px solid rgba(231, 76, 60, 0.16);
	}
	.color3 {
		background: rgba(241, 196, 15, 0.05);
		
		color: #F1C40F;
		border: 2px solid rgba(241, 196, 15, 0.16);
	}
	.color4 {
		background: rgba(52, 152, 219, 0.05);
		color: #3498DB;
		border: 2px solid rgba(52, 152, 219, 0.16);
	}
	.color4 {
		background: rgba(155, 89, 182, 0.05);
		border: 2px solid rgba(155, 89, 182, 0.16);
		color: #AE51D4;
	}
	
.main {
	width: calc(100% - 25rpx);
	padding: 20rpx 12.5rpx 20rpx;
	border-radius: 20rpx;
	&-wrap {
		width: calc(100% - 10rpx);
		padding: 5rpx;
		&-slogon {
			display: flex;
			align-items: center;
			justify-content: center;
			margin-top: 24rpx;
			padding-bottom: 60rpx;
			&-1 {
				width: 80rpx;
				height:80rpx;
				border-radius: 50%;
			}
			&-2 {
				font-size: 40rpx;
				font-weight: bold;
				color: #2E4964;
				margin: 0 10rpx;
			}
			&-3 {
				font-size: 40rpx;
				color: #8292A2;
			}
		}
	}
	&-img {
		width: 100%;
		height: 600rpx;
		position: relative;
		background: gray;
		
		&-juxing {
			position: absolute;
			left: 0;
			bottom: 0;
			z-index: 1;	
			width: 100%;
			height: 40rpx;
		}
		&-avatar {
			position: absolute;
			z-index: 2;
			left: 50%;
			transform: translateX(-50%);
			bottom: 0;
			border-radius: 50%;
			background: #fff;
			width:140rpx;
			height:140rpx;
			&-img {
				position: absolute;
				left: 50%;
				top:50%;
				transform: translate(-50%, -50%);
				width:120rpx;
				height:120rpx;
			}
			&-name {
				background: #1ABC9C;
				border-radius: 20rpx;
				color: #fff;
				font-size: 24rpx;
				font-weight: 700;
				position: absolute;
				left:50%;
				transform: translateX(-50%);
				bottom: 0;
				z-index: 1;
				padding: 0 20rpx;
				min-width: 100rpx;
			}
		}
	}
	&-box {
		background: #fff;
		border-radius: 4rpx;
		&-title {
			padding-top:20rpx;
			width: calc(100% - 40rpx);
			padding: 30rpx 20rpx 0;
			font-size: 40rpx;
			color: #2E4964;
			font-weight: 400;
			word-break: break-all;
			&-bold {
				color: #1ABC9C
			}
				
		}
		&-tag {
			margin-top: 20rpx;
			display: flex;
			flex-wrap: wrap;
			justify-content: center;
			&-item {
				display: flex;
				justify-content: center;
				align-items: center;
				padding: 20px;
				height: 44px;
				border-radius: 12px;
				font-size: 28rpx;
				box-sizing: border-box;
				margin-right: 10rpx;
				margin-top:10rpx;
			}
		}
		&-qrcode {
			display: flex;
			align-items: center;
			background: #F4F6F7;
			border-radius: 20rpx;
			padding: 10rpx;
			margin-top: 20rpx;
			width: calc(100% - 50rpx);
			margin-left: 15rpx;
			&-left {
				width: 200rpx;
				height: 200rpx;
				border-radius: 20rpx;
			}
			&-right {
				margin-left: 20rpx;
				flex: 1;
				display: flex;
				flex-direction: column;
				justify-content: space-evenly;
				height: 200rpx;
				&-top {
					font-size: 40rpx;
					color: #2E4964;
				}
				&-bottom {
					font-size: 28rpx;
					color: #8292A2;
				}
			}
		}
		&-copyright {
			margin-top: 30rpx;
			padding-bottom: 30rpx;
			width: calc(100% - 40rpx);
			padding: 0 20rpx 30rpx;
			font-size: 28rpx;
			color: #7F8C8D;
			font-weight: 400;
			word-break: break-all;
			&-title {
				color: #34495E
			}
		}
		
	}
}
</style>
